home *** CD-ROM | disk | FTP | other *** search
/ Columbia Kermit / kermit.zip / newsgroups / misc.19970626-19970929 / 000297_news@newsmaster….columbia.edu _Fri Sep 5 11:40:27 1997.msg < prev    next >
Internet Message Format  |  2020-01-01  |  2KB

  1. Return-Path: <news@newsmaster.cc.columbia.edu>
  2. Received: from newsmaster.cc.columbia.edu (newsmaster.cc.columbia.edu [128.59.35.30])
  3.     by watsun.cc.columbia.edu (8.8.5/8.8.5) with ESMTP id LAA29370
  4.     for <kermit.misc@watsun.cc.columbia.edu>; Fri, 5 Sep 1997 11:40:26 -0400 (EDT)
  5. Received: (from news@localhost)
  6.     by newsmaster.cc.columbia.edu (8.8.5/8.8.5) id LAA16601
  7.     for kermit.misc@watsun; Fri, 5 Sep 1997 11:40:25 -0400 (EDT)
  8. Path: news.columbia.edu!panix!cam-news-hub1.bbnplanet.com!cpk-news-hub1.bbnplanet.com!news.bbnplanet.com!newsxfer3.itd.umich.edu!oleane!calvacom!not-for-mail
  9. From: do11@calva.net (Dominique Ottello)
  10. Newsgroups: comp.protocols.kermit.misc
  11. Subject: define substitution variable (\%e) does not work within switch structure
  12. Date: Fri, 05 Sep 1997 15:34:35 GMT
  13. Organization: PCatHome&Me
  14. Lines: 36
  15. Message-ID: <34101aa2.852637@news.calvacom.fr>
  16. Reply-To: do11@calva.net
  17. NNTP-Posting-Host: ppp9-01.calvacom.fr
  18. Mime-Version: 1.0
  19. Content-Type: text/plain; charset=us-ascii
  20. Content-Transfer-Encoding: 7bit
  21. X-Newsreader: Forte Agent 1.5/32.451
  22. Xref: news.columbia.edu comp.protocols.kermit.misc:7618
  23.  
  24. Define substitution variable (\%e) does not change the content of the
  25. variable when the define is inside a switch structure.
  26.  
  27. The same structure works fine with a named macro in place of the
  28. substitution variable.
  29.  
  30. Try with this take file :
  31.  
  32. undefine Avion
  33. undefine \%e
  34. undefine Type
  35. :Beg
  36. ask Avion {Enter type (A320,B747,B767,) : }
  37. if not defined Avion goto Beg
  38. ;
  39. switch \m(Avion) {
  40.  :A320,define \%e CFM56-5A,break
  41.  :B747,define \%e CF6-80C2,break
  42.  :B767,define \%e CF6-80C2,break
  43.  :default,define \%e Unknown,break
  44.  }
  45. echo {Macro \\%e  : [\%e]}
  46. ;
  47. switch \m(Avion) {
  48.  :A320,define Type CFM56-5A,break
  49.  :B747,define Type CF6-80C2,break
  50.  :B767,define Type CF6-80C2,break
  51.  :default,define Type Unknown,break
  52.  }
  53. echo {Macro Type : [\m(Type)]}
  54.  
  55. Comments please.
  56.  
  57. Best regards,
  58.  
  59. == Dominique Ottello == do11@calva.net == Paris == France ==